07. 过滤、丢空、去重

过滤、丢空、去重

1. 过滤

为保持一致性,仅比较加州认证的汽车。使用 query 过滤两个数据集,仅选择 cert_region CA 的行。然后,删除 `cert_region' 列,因为它不再提供任何有用的信息(我们知道每个值都是 'CA')。

2. 丢空

删除两个数据集中包含缺失值的任何行。

3. 去重

删除两个数据集中的任何重复行。

练习提示

本课程中涉及的练习题中的原始数据是前一个练习题的输出(to_csv的文件)。 你需要将上个练习题的数据下载下来,然后上传到下一个练习题的workspace中 。因为每个练习题中的workspace是相互独立的。(后面的练习题同理)

Workspace

This section contains either a workspace (it can be a Jupyter Notebook workspace or an online code editor work space, etc.) and it cannot be automatically downloaded to be generated here. Please access the classroom with your account and manually download the workspace to your local machine. Note that for some courses, Udacity upload the workspace files onto https://github.com/udacity , so you may be able to download them there.

Workspace Information:

  • Default file path:
  • Workspace type: jupyter
  • Opened files (when workspace is loaded): n/a

QUIZ QUESTION: :

在按认证区域过滤后,匹配关于新数据集中以下特征的值。

ANSWER CHOICES:



特征

1611

2404

10

14

798

13

1084

823

SOLUTION:

特征

798

13

1084